/***************************************************************************//**
 * @file bsp_BL55072A。h
 * @brief for mac
 * @author ze .
 * @date  2022/9/25.
 * @copyright Copyright
 ******************************************************************************/

#ifndef __BL55072A_H
#define __BL55072A_H

#include "bsp_gpio.h"

#define uint8  uint8_t
#define uint16 uint16_t
#define xdata
#define idata

#define LCD_DIS_BUF_LEN		8//15

#define  BL55072A_ADR_W 0x7C  //写地址
#define  BL55072A_ADR_R 0x7D  //读地址

#define MODESET 	0xC8//0xCC// 	//mode set模式设置命令 
#define ADSET		0x00	//address set 地址设置命令 
//#define DISCTL		0xA2	//display control 显示控制命令
#define DISCTL    0xA4   //改为低功耗模式power save mode 1 – Frame inversion mode
#define ICSET		0xEA	//set IC operation 芯片设置命令 
#define ICSET_MSB	0xE8	//set IC operation 芯片设置命令 
#define BLKCTL		0xF0	//blink control 闪烁控制命令 
#define APCTL		0xFE	//all pixel control 全显控制命令 

extern uint8 idata LcdDisDataBuffer[LCD_DIS_BUF_LEN];
extern uint8 xdata LCD_DIS_Flag;

// - - 定义子程序函数
void i2c_Delay(void);
void BL55072A_Init(void); // - - 初始化 BL55072A

void LCD_DIS_all(uint8_t ctrl);

extern void BL55072A_DisTR(void);
extern void BL55072A_DisOn(void);
extern void LCD_DIS_battery(uint8 level);

uint8_t getLcdWorkFlag();
void LcdBattLevelSet(uint8_t battLevel);
void LcdRssiLevelSet(uint8_t rssiLevel);
void LcdRegistingStart();
void LcdRegistFinish(bool isSucc);
void LCD_blink_ctrl(bool isOn);
void LcdRssiFlashCtrl(uint8_t times);
void LcdTempUnitSet(bool isC);
#endif

